package view;

import java.util.Timer;
import java.util.TimerTask;

import com.shilehui.www.R;

import core.ServerHelper;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;

public class CoverActivity extends Activity {
	/** Called when the activity is first created. */

	private static final long COVER_DELAY = 2000; // 封面延时(ms)

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.cover);

		TimerTask timeTask = new TimerTask() {
			public void run() {
				Intent intent = new Intent(CoverActivity.this,
						MainMenuTabhostActivity.class);
				CoverActivity.this.startActivity(intent);
				CoverActivity.this.finish();
			}
		};

		Timer timer = new Timer();
		timer.schedule(timeTask, COVER_DELAY);

		ServerHelper.sharedServerHelper().setContext(
				this.getApplicationContext());
	}
}